import { Config } from './types/config';
import * as fs from 'fs';
import * as process from 'process';
import * as path from 'path';

const fileName = process.env['NODE_PROD'] === '1' ? 'prod.json' : 'dev.json';
const config = <Config> JSON.parse(
  fs.readFileSync(path.resolve(__dirname, 'config', fileName), { encoding: 'utf-8' })
);
export default config;
